"""
__project__ = 'thc'
__file_name__ = 'logging_01'
__author__ = 'thc'
__time__ = '2020/12/28/028 16:16'
__product_name = PyCharm
-*- coding:utf-8 -*-
"""

import logging


logging_1 = '%(asctime)s-%(name)s-%(levelname)s-%(message)s'
logging_2 = '%Y-%m-%d %H:%M:%S'

logging.basicConfig(
    level=logging.INFO,
    format=logging_1,
    datefmt=logging_2,
    filename=r'd:\log.log',
    filemode='w'
)

logging.debug('debug')
logging.info('info')
logging.warning('warning')
logging.error('error')
logging.critical('critical')

